/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 5/16/18
Time: 1:49 PM
 */

package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.BaseEntity
import Cn.Sarkar.Entities.IMS.IDomainProduct
import Cn.Sarkar.Entities.IMS.IIMSApplicationDomain
import Cn.Sarkar.Entities.IMS.IProduct
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.DomainProducts

class DomainProduct(DataContext: IDataContext) : IDomainProduct, BaseEntity(DataContext, DomainProducts) {
    var applicationDomainID by DomainProducts.IMSApplicationDomainID
    override var applicationDomain: IIMSApplicationDomain by hasOne(DomainProducts.IMSApplicationDomainID) { IMSApplicationDomain(it) }
    var productID by DomainProducts.ProductID
    override var product: IProduct by hasOne(DomainProducts.ProductID) { Product(it) }
}